package top.rufous.hrm.fegin;

import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;
import top.rufous.hrm.domain.LoginUser;
import top.rufous.hrm.util.AjaxResult;
@Component
public class LoginUserFallbackFactory implements FallbackFactory<LoginUserFeign> {
    @Override
    public LoginUserFeign create(Throwable throwable) {
        return new LoginUserFeign() {
            @Override
            public AjaxResult entering(LoginUser loginUser) {
                return new AjaxResult().setSuccess(false).setMessage("小伙纸,出问题啦别干入啦!");
            }
        };
    }
}
